<?php
global $_GPC, $_W;
$uniacid = $_W['uniacid'];
$id = $_GPC['id'];
$res = $this->res;
$plus = $this->plus;
load()->func('tpl');
$setting = $this->baseset($uniacid);
$openid = $_W['openid'];
$userinfo = $this->Get_checkoauth();
if (empty($_W['openid'])) {
	$openid = $userinfo['openid'];
}
$show = pdo_fetch("SELECT * FROM " . tablename($this->tableads) . " WHERE uniacid = '{$_W['uniacid']}' AND id = '{$id}' AND status=1");
$_share['title'] = $show['title'];
$_share['imgUrl'] = tomedia($show['thumb']);
$_share['desc'] = $userinfo['nickname'] . "发现这个主题不错，并分享给你";
$_share['link'] = $_W['siteroot'] . "app/index.php?i=" . $_W['uniacid'] . "&c=entry&do=show_ads&m=bsht_tbk&id=" . $show['id'];
$_W['page']['sitename'] = $show['title'];
if ($show['isjump'] == 1) {
}
if ($_W['container'] != 'wechat') {
	$jumpurl = $show['jumpurl'];
	Header('HTTP/1.1 303 See Other');
	Header("Location: $jumpurl");
} else {
	if ($show['isjump'] != 1) {
		$jumpurl = $show['jumpurl'];
		Header('HTTP/1.1 303 See Other');
		Header("Location: $jumpurl");
	} else {
		include $this->template('show_ads');
	}
}